Problem Statement: How do you translate “For every integer x, x>0”?
Variable: Lowercase symbol that stands for an individual in a collection or set.
Incomplete Statements: Statement containing one or more variables.
Tip: Replace the word “set/domain” with “array/list” if you have a programming background.
Quantifiers: Phrases that refer to given quantities, indicating how many objects have a certain property.
Predicate: Verbal statement that describes the property of a variable.
Combining the quantifier and predicate, we get a complete statement of the form:
Interpretation Domain: Collection of objects that may be chosen in a given predicate WFF.
The truth of an expression is based on its interpretation.
Examples for various interpretations of (\forall x) P(x):
false
)true
)false
)Note on Contradiction: If (\forall X) P(x) is true, (\exists X) P(x) cannot be false
An interpretation for an expression involving predicates consists of the following:
Unary Predicates: Predicates involving properties of single variables
Binary, ternary, and n-ary predicates are also possible.
Example: (\forall x)(\exists y) Q(x,y) is a binary predicate. (“For every x there exists a y such that Q(x,y)”)
Predicate Wffs: A well-formed formula in predicate logic.
Free Variable: Variable without a quantifier
Example Predicate Wff:
- (\forall x)[P(x) \to Q(x)]
- (\forall x)\textcolor{blue}{((\exists y)\textcolor{red}{[P(x,y) \lor Q(x,y)]} \to R(x))}
- S(x,y) \land R(x,y)
Reading the example:
- Scope of y is \textcolor{red}{[P(x,y) \lor Q(x,y)]}
- Scope of x is \textcolor{blue}{((\exists y)\textcolor{red}{[P(x,y) \lor Q(x,y)]} \to R(x))}
- We can’t tell truth value because we don’t have x or y (incomplete wff)
Example Predicate Wff:
- (\forall x) S(x) \lor (\exists y) R(y)
Reading the example:
- Scope of x is S(x)
- Scope of y is R(y)
Example Predicate Wff:
- (\forall x)[P(x,y) \to (\exists y)Q(x,y)]
Reading the example:
- Scope of x is the whole thing
- Scope of y is not defined for P(x,y), hence y is called a free variable.
Example: Determine the truth value of the wff
- (\exists x)[A(x) \land (\forall y)[B(x,y) \to C(y)]]
- A(x) is \textcolor{red}{x > 0}
- B(x,y) is \textcolor{green}{x>y}
- C(y) is \textcolor{yellow}{y \le 0}
- Domain of x is positive integers
- Domain of y is all integers
Solution: (\exists x)[\textcolor{red}{x > 0} \land (\forall y)[\textcolor{green}{x>y} \to \textcolor{yellow}{y \le 0}]]
- The first quantifier is the most important question we want to answer
- \exist x asks us “Is there an x larger than 0 where for all y if x is larger than y, then y is less than or equal to 0”
- This statement is true for x=1, so this statement is true because \exist only needs us to find one case.
Translate “Every person is nice” to symbolic form:
- Can be rephrased as “for any thing, if it is a person, then it is nice”
- Let \textcolor{red}{P(x)} be “x is a person” and \textcolor{green}{Q(x)} be “x is nice”:
- Symbolic form: (\forall x)[\textcolor{red}{P(x)} \to \textcolor{green}{Q(x)}]
- Note: “All persons are nice” or “Each person is nice” will have the same symbolic form
Translate “There is a nice person” to symbolic form:
- Can be rephrased as “there exists something that is both a person and nice”
- Let \textcolor{red}{P(x)} be “x is a person” and \textcolor{green}{Q(x)} be “x is nice”:
- Symbolic form: (\exist x)[\textcolor{red}{P(x)} \land \textcolor{green}{Q(x)}]
- “For all things, there exists a thing which is a person and nice”
Write symbolic form for “All dogs chase all rabbits”:
- Given predicate symbols:
- D(x): “x is a dog”
- R(x): “x is a rabbit”
- C(x,y): “x chases y”
Solution: (\forall x)[D(x) \to (\forall y) [ R(y) \to C(x,y)] ]
- Reading the above: “For anything, if it is a dog, then for any other thing, if it is a rabbit, then the dog chases it”
Another Possible Solution (Deduction Method): (\forall x)(\forall y)[D (x) \land R(y) \to C(x,y)]
- Reading the above: “For all things x and y, if x is a dog and y is a rabbit, then the dog chases the rabbit”
Write symbolic form for “Some dogs chase all rabbits”:
- Given predicate symbols:
- D(x): “x is a dog”
- R(x): “x is a rabbit”
- C(x,y): “x chases y”
Solution: (\exists x)[D(x) \land (\forall y) [R(y) \to C(x,y)]]
- Reading the above: There exists an x (where x is a dog) where for all y, if y is a rabbit, then the dog will chase the rabbit.
Write symbolic form for “Only dogs chase rabbits”:
- Given predicate symbols:
- D(x): “x is a dog”
- R(x): “x is a rabbit”
- C(x,y): “x chases y”
Rephrase: “For anything that chases rabbits, it has to be a dog”
- Since no quantifier is given for rabbits, we assume it is universal (\forall)
Solution: (\forall y)(\forall x)[R(y) \land C(x,y) \to D(x)]
- Reading the above: For all y and all x, if y is a rabbit and it is being chased by x, then x is a dog
Instructions: Rewrite the following statements as predicate wffs using given variables.
Given:
Rewrite:
Given:
Rewrite:
Given:
Rewrite:
How-to Apply De Morgan to Predicate Wffs:
Example: “Something is fun” (\exists x) is the opposite of “Nothing is fun” (\forall x)
Given:
- A(x): x is fun
- (\forall x) A(x): Everything is fun
Negation:
- [(\forall x) A(x)]' \equiv (\exists x)[A(x)']
- “It is false that everything is fun” \equiv “Something is nonfun”
Instructions: Negate the following statements.
Q: “Everybody loves somebody sometime”
Q: “Some pictures are old and faded.”
Q: “All people are tall and thin”
Q: “Some students eat only pizza”
Q: “Only students eat pizza”
Validity: A predicate wff is valid if it’s intrinsically true.
Propositional Tautologies versus Predicate Validity:
Propositional Wffs | Predicate Wffs | |
---|---|---|
Truth values | True or false – depends on the truth value of statement letters | True, false or neither (if the wff has a free variable) |
Intrinsic truth | Tautology – true for all truth values of its statements | Valid wff – true for all interpretations |
Methodology | Truth table to determine if it is a tautology | No algorithm to determine |
Examples of Valid and Invalid Predicates:
- (\forall x)P(x) \to (\exists x)P(x) (valid)
- (\exists x)P(x) \to (\forall x)P(x) (invalid)
- e.g., Suppose P(x) is “x is even”. Then “there is an integer that is even” \not \to “every integer is even”
Instructions: Determine whether the following wffs are true. Domain of x is all real integers.
Q: (\forall x)[L(x) \to (O(x)] where O(x): “x is odd” and L(x): “x < 10”
Q: (\exists y)(\forall x)(x + y = 0)
Q: (\forall x)(\exists y)(x + y = 0)
Problem: “Every ambassador speaks only to diplomats, and some ambassadors speak to someone. Therefore, there is a diplomat.”
Answer: (\forall x)(\forall y)[A(x) \land S(x,y) \to D(y)] \land (\exists x) (\exists y)[ A(x) \land S(x,y) ] \to (\exists x)D(x)
Notes:
Predicate Logic: Can represent more complicated statements than statement/propositional logic.
Basic approach to proving predicate logic arguments:
From | Can Derive | Name | Restrictions |
---|---|---|---|
(\forall x)P(x) | P(t) where t is a variable or constant symbol | Universal Instantiation; ui | If t is a variable, it must not fall in the scope of a quantifier for t |
(\exists x)P(x) | P(t) where g is a variable or constant symbol not previous used in a proof sequence | Existential Instantiation; ei | Must be the first rule used that introduces t |
P(x) | (\forall x)P(x) | Universal Generalization; ug | P(x) hasn’t been deduced by existential instantiation from any wff in which x is a free variable |
P(x) or P(a) | (\exists x)P(x) | Existential Generalization; eg | To go from P(a) to (\exists x)P(x), x mustn’t appear in P(a) |
Notes:
- Instantiation basically lets us strip away \exists and \forall; generalization lets us add them back.
Instructions: Prove the following arguments
Problem: “All flowers are plants. Sunflower is flower. Therefore, sunflower is a plant.”
Translation: (\forall x)[P(x) \to Q(x)] \land [P(a) \to Q(a)]
Proof Sequence:
Problem: (\forall x)[P(x) \to Q(x)] \land [Q(y)]' \to [P(y)]'
Proof Sequence:
Problem: (\forall x)P(x) \to (\exists x)P(x)
Proof Sequence:
Problem: (\forall x)[P(x) \land Q(x)] \to (\forall x)P(x) \land (\forall x)Q(x)
Proof Sequence: